#include "IndirectionEen.h"
#include <cassert>
#include "e7convert.h"

IndirectionEen::IndirectionEen(FileSystem* filesystem, byte *bytes) : Indirection(filesystem, bytes) {
	int j = 0;
    for (int i = 0; i < INDSIZ; ++i) {
	    blocklist[i] = getlong(bytes, j);
	    j += 4;
    }
}

IndirectionEen::~IndirectionEen() {
}

long IndirectionEen::getBlocknummer(int relative_block_position) {
    assert(relative_block_position >= 0);
    assert(relative_block_position <= INDSIZ);

    return blocklist[relative_block_position];
}
